using System;
using System.Collections.Generic;
using System.Text;
using FlatRedBall;
using FlatRedBall.Input;
using FlatRedBall.AI.Pathfinding;
using FlatRedBall.Graphics.Animation;
using FlatRedBall.Graphics.Particle;

using FlatRedBall.Math.Geometry;
using FlatRedBall.Math.Splines;
using BitmapFont = FlatRedBall.Graphics.BitmapFont;
using Cursor = FlatRedBall.Gui.Cursor;
using GuiManager = FlatRedBall.Gui.GuiManager;

#if FRB_XNA || SILVERLIGHT
using Keys = Microsoft.Xna.Framework.Input.Keys;
using Vector3 = Microsoft.Xna.Framework.Vector3;
using Texture2D = Microsoft.Xna.Framework.Graphics.Texture2D;


#endif

namespace Gnome.Entities
{
	public partial class HomeBase
	{
		private void CustomInitialize()
		{

		}

		private void CustomActivity()
		{
            //HomeBaseSprite.Visible = false;
		}

		private void CustomDestroy()
		{


		}

        public void SetupSprite(Sprite inputsprite)
        {
            Door.GlowSprite = new Sprite();
            Door.EffectGlowSprite = new Sprite();
            Position = inputsprite.Position;
            HomeBaseSprite = inputsprite;
            HomeBaseSprite.AttachTo(this, false);
            //Z = 1;
            CollisionBox.ScaleX = HomeBaseSprite.ScaleX / 1.2f;
            CollisionBox.ScaleY = HomeBaseSprite.ScaleY;
            CollisionBox.Position = Position;
            Door.AppleTreeSprite = new Sprite();
            Door.AppleTreeSprite.Visible = false;
            Door.CollisionBox.Z = 1;
            Door.RelativeY = -(HomeBaseSprite.ScaleY - Door.CollisionBox.ScaleY/2);
            Door.RelativeX -= 0.4f;
            Door.CollisionRadius.Radius = 1.5f;
            Door.EffectSprite = new Sprite();
            Door.GlowSprite = new Sprite();
            Door.EffectGlowSprite = new Sprite();
            Door.HidingEffectSprite = new Sprite();
            GlowSprite = SpriteManager.AddSprite(@"Content/Screens/LevelOne/images/dog-house-outline.png");
            GlowSprite.Position = HomeBaseSprite.Position;
            GlowSprite.ScaleX = HomeBaseSprite.ScaleX;
            GlowSprite.ScaleY = HomeBaseSprite.ScaleY;
            GlowSprite.Visible = false;
            GlowSprite.AttachTo(this, false);
        }

        public void SetupSecondSprite(Sprite inputsprite)
        {
            Door.GlowSprite = new Sprite();
            Door.EffectGlowSprite = new Sprite();
            Position = inputsprite.Position;
            HomeBaseSprite = SpriteManager.AddSprite(@"Content/Screens/LevelOne/Images/dog-house-two.png");
            HomeBaseSprite.ScaleX = inputsprite.ScaleX;
            HomeBaseSprite.ScaleY = inputsprite.ScaleY;
            HomeBaseSprite.AttachTo(this, false);
            //Z = 1;
            CollisionBox.ScaleX = HomeBaseSprite.ScaleX / 1.2f;
            CollisionBox.ScaleY = HomeBaseSprite.ScaleY;
            CollisionBox.Position = Position;
            Door.AppleTreeSprite = new Sprite();
            Door.AppleTreeSprite.Visible = false;
            Door.CollisionBox.Z = 1;
            Door.RelativeY = -(HomeBaseSprite.ScaleY - Door.CollisionBox.ScaleY / 2);
            Door.RelativeX += 0.4f;
            Door.CollisionRadius.Radius = 1.5f;
            Door.EffectSprite = new Sprite();
            Door.GlowSprite = new Sprite();
            Door.EffectGlowSprite = new Sprite();
            Door.HidingEffectSprite = new Sprite();
            GlowSprite = SpriteManager.AddSprite(@"Content/Screens/LevelOne/images/dog-house-two-outline.png");
            GlowSprite.Position = HomeBaseSprite.Position;
            GlowSprite.ScaleX = HomeBaseSprite.ScaleX;
            GlowSprite.ScaleY = HomeBaseSprite.ScaleY;
            GlowSprite.Visible = false;
            GlowSprite.AttachTo(this, false);
        }

        //Create a new GnomePlayer instance
        public GnomePlayer CreateGnome()
        {
            GnomePlayer gnome = new GnomePlayer(ContentManagerName, true);
            gnome.Home = this;
            return gnome;
        }

        private static void CustomLoadStaticContent(string contentManagerName)
        {


        }
	}
}
